* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

button {
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

button:hover {
    background-color: #0056b3;
}

.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.button-group button {
    flex: 1;
}

.clear-btn {
    background-color: #dc3545;
}

.clear-btn:hover {
    background-color: #c82333;
}

.id-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 10px;
}

.loading-indicator {
    text-align: center;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.audio-container {
    margin-top: 20px;
    text-align: center;
}

audio {
    width: 100%;
    margin-bottom: 10px;
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 10px;
}

.download-btn:hover {
    background-color: #218838;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
}

.instruction {
    margin-bottom: 20px;
    text-align: left;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.warning {
    color: #dc3545;
    display: inline-block;
    margin-top: 5px;
}

.audio-list {
    margin-top: 20px;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.audio-list::-webkit-scrollbar {
    width: 8px;
}

.audio-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.audio-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.audio-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.audio-item {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.audio-item:last-child {
    margin-bottom: 5px;
}

.audio-item .filename {
    font-size: 14px;
    color: #333;
    word-break: break-all;
    line-height: 1.4;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.audio-item .controls-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.audio-item audio {
    flex: 1;
    min-width: 250px;
    max-width: 100%;
}

.audio-item .download-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.audio-item .download-btn:hover {
    background-color: #45a049;
}
